/*
 * xstring.h
 *
 *  Created on: Sep 26, 2011
 *      Author: lindenb
 */
#ifndef X_STRING_H
#define X_STRING_H
#include <vector>
#include <string>
#include "xstdio.h"

class CStringReader:public Reader
	{
	private:
		const char* str;
		std::size_t len;
		std::size_t curr;
	public:
		CStringReader(const char* s,std::size_t len);
		CStringReader(const char* s);
		virtual int eof();
		virtual ~CStringReader();
		virtual void close();
		virtual int getc();
	};

class XCString
    {
    public:
	static std::size_t split(char *line,const char* delim,std::vector<char*>& tokens);
	static std::size_t split(const char *line,const char* delim,std::vector<std::string>& tokens);
    };

#endif
